﻿package mortal.game.view.copy.groupCopy.data
{

    public class DefenseInfo extends Object
    {
        public static var DefenseCopyCode:int = 112;
        public static var DefenseCopyCodeArr:Array = [[112, 165, 166], [154, 167, 168], [155, 169, 170], [156, 171, 172]];
        public static var DefenseGuideCopyCode:int = 128;
        public static var TeamDefenseCopyCode:int = 138;
        public static var defenseInfo:Object = {};
        public static var OrangeEquipCopyCode:int = 157;

        public function DefenseInfo()
        {
            return;
        }// end function

        public static function updateRwState(param1:int, param2:int, param3:int) : void
        {
            if (defenseInfo[param1] == null)
            {
                return;
            }
            defenseInfo[param1].rewards[param2] = param3;
            return;
        }// end function

        public static function getCopyArrByDiff(param1:int) : Array
        {
            param1 = param1 < 0 ? (0) : (param1);
            param1 = param1 > 2 ? (2) : (param1);
            var _loc_2:Array = [];
            var _loc_3:int = 0;
            while (_loc_3 < DefenseCopyCodeArr.length)
            {
                
                _loc_2.push(DefenseCopyCodeArr[_loc_3][param1]);
                _loc_3++;
            }
            return _loc_2;
        }// end function

        public static function getLvAndDifByCode(param1:int) : Array
        {
            var _loc_4:Array = null;
            var _loc_5:int = 0;
            var _loc_6:int = 0;
            var _loc_2:* = DefenseCopyCodeArr;
            var _loc_3:int = 0;
            while (_loc_3 < _loc_2.length)
            {
                
                _loc_4 = _loc_2[_loc_3];
                _loc_5 = 0;
                while (_loc_5 < _loc_4.length)
                {
                    
                    _loc_6 = _loc_4[_loc_5];
                    if (param1 == _loc_6)
                    {
                        return [_loc_3, _loc_5];
                    }
                    _loc_5++;
                }
                _loc_3++;
            }
            return null;
        }// end function

    }
}
